package com.tencent.wxcloudrun.config;

import cn.hutool.http.HttpStatus;
import lombok.Data;

/**
 * @author xk奇ji
 */
@Data
public class ApiResponse<T> {
    private int status;
    private String message;
    private T data;

    public ApiResponse(int status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public ApiResponse(int status, String message) {
        this.status = status;
        this.message = message;
        this.data = null;
    }

    public ApiResponse(T data) {
        this.status = HttpStatus.HTTP_OK;
        this.message = "success";
        this.data = data;
    }

}
